﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data;
using WebApplication1.Common;
using WebApplication1.Models;

namespace WebApplication1.BLL
{
    public class XgBLL
    {
        /// <summary>
        /// 推送注册错误日志
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="acitonType"></param>
        /// <returns></returns>
        public int AddXgErrorLog(string msg,int acitonType)
        {
            string sql = "INSERT INTO [dbo].[XgPushRegisterErrorLog]([errorId],[errorMsg],[actionType],[createTime]) VALUES(NEWID(),@errorMsg,@actionType,GETDATE())";
            SqlParameter[] parames = {
                new SqlParameter("@errorMsg",msg),
                new SqlParameter("@actionType",acitonType)
            };
            int count = SQLHepler.ExecuteSql(sql, parames);
            return count;
        }

    }
}
